//
//  ProductInfoDetail.m
//  QS
//
//  Created by jonn on 14-4-24.
//  Copyright (c) 2014年 seas.cheng. All rights reserved.
//

#import "ProductDetail.h"


@implementation ProductDetail

#pragma mark - JSON serialization
+ (NSDictionary *)JSONKeyPathsByPropertyKey {
    return nil;
}

+ (NSValueTransformer *)productInfoDetailJSONTransformer{
    return [NSValueTransformer mtl_JSONDictionaryTransformerWithModelClass:[ProductInfoDetail class]];
}

+ (NSValueTransformer *)reportListJSONTransformer{
    return [NSValueTransformer mtl_JSONArrayTransformerWithModelClass:[ReportList class]];
}



#pragma mark - Managed object serialization

+ (NSString *)managedObjectEntityName {
    return @"ProductDetail";
}

+ (NSDictionary *)managedObjectKeysByPropertyKey {
    return nil;
}

+(NSDictionary *)relationshipModelClassesByPropertyKey{
    return @{
             @"productInfoDetail"  : [ProductInfoDetail class],
             @"reportList"  : [ReportList class],
             };
}

//在从coredata中取数据时的数据排序方式
+(NSSortDescriptor *)sortDescriptor{
    return [[NSSortDescriptor alloc] initWithKey:@"percent" ascending:NO];
}
@end




@implementation ProductInfoDetail

#pragma mark - JSON serialization
+ (NSDictionary *)JSONKeyPathsByPropertyKey {
    return nil;
}
+ (NSValueTransformer *)productEvaluateJSONTransformer{
    return [NSValueTransformer mtl_JSONArrayTransformerWithModelClass:[ProductEvaluate class]];
}
+ (NSValueTransformer *)productPriceJSONTransformer{
    return [NSValueTransformer mtl_JSONArrayTransformerWithModelClass:[ProductDetailPrice class]];
}

#pragma mark - Managed object serialization

+ (NSString *)managedObjectEntityName {
    return @"ProductInfoDetail";
}

+ (NSDictionary *)managedObjectKeysByPropertyKey {
    return nil;
}

+(NSDictionary *)relationshipModelClassesByPropertyKey{
    return @{
             @"productEvaluate"  : [ProductEvaluate class],
             @"productDetailPrice"  : [ProductDetailPrice class],
             };
}

@end




@implementation ProductEvaluate

#pragma mark - JSON serialization
+ (NSDictionary *)JSONKeyPathsByPropertyKey {
    return nil;
}
#pragma mark - Managed object serialization

+ (NSString *)managedObjectEntityName {
    return @"ProductEvaluate";
}

+ (NSDictionary *)managedObjectKeysByPropertyKey {
    return nil;
}

@end



@implementation ProductDetailPrice

#pragma mark - JSON serialization
+ (NSDictionary *)JSONKeyPathsByPropertyKey {
    return nil;
}

#pragma mark - Managed object serialization

+ (NSString *)managedObjectEntityName {
    return @"ProductDetailPrice";
}

+ (NSDictionary *)managedObjectKeysByPropertyKey {
    return nil;
}


@end


@implementation ReportList

#pragma mark - JSON serialization
+ (NSDictionary *)JSONKeyPathsByPropertyKey {
    return nil;
}

#pragma mark - Managed object serialization

+ (NSString *)managedObjectEntityName {
    return @"ReportList";
}

+ (NSDictionary *)managedObjectKeysByPropertyKey {
    return nil;
}

@end
